package com.iceclean.po;

/**
 * @author : Ice'Clean
 * @date : 2021-05-03
 *
 * 贴子实体类
 */
public class Post {
    private Integer postBarId;
    private Integer userId;
    private Integer postId;
    private String postName;
    private String createDate;
    private String postContent;
    private Integer postBrowsing;
    private Integer postLiked;
    private Integer postCollected;
    private Integer postComment;
    private Integer postFloor;

    /**
     * 存放贴吧创建者 id
     * 有这个 id 的表示该贴子为公告贴
     * 只有吧主能回帖，其他人只能浏览
     * 同时贴子对外有特殊的标识用于区分其他贴子
     */
    private Integer postAdminId;

    /**
     * 存放贴子是否要删除的标识（1 表示将要被删除，0 表示正常）
     * 当贴子被发布者或者吧主删除时，将该表示置为 1
     * 吧主有权限回复贴吧内被删除的贴子（在贴子回收站内）
     */
    private Integer postDelete;

    public Post() {
        this.postBrowsing = 0;
        this.postLiked = 0;
        this.postCollected = 0;
        this.postComment = 0;
        this.postFloor = 0;
        this.postDelete = 0;
    }

    public Post(Integer postBarId, Integer userId, String postName, String postContent) {
        this.postBarId = postBarId;
        this.userId = userId;
        this.postName = postName;
        this.postContent = postContent;
        this.postBrowsing = 0;
        this.postLiked = 0;
        this.postCollected = 0;
        this.postComment = 0;
        this.postFloor = 0;
        this.postDelete = 0;
    }

    public Post(Integer postBarId, Integer userId, String postName, String postContent, Integer postAdminId) {
        this.postBarId = postBarId;
        this.userId = userId;
        this.postName = postName;
        this.postContent = postContent;
        this.postAdminId = postAdminId;
        this.postBrowsing = 0;
        this.postLiked = 0;
        this.postCollected = 0;
        this.postComment = 0;
        this.postFloor = 0;
        this.postDelete = 0;
    }

    public void setPostBarId(Integer postBarId) {
        this.postBarId = postBarId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public void setPostId(Integer postId) {
        this.postId = postId;
    }

    public void setPostName(String postName) {
        this.postName = postName;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public void setPostContent(String postContent) {
        this.postContent = postContent;
    }

    public void setPostBrowsing(Integer postBrowsing) {
        this.postBrowsing = postBrowsing;
    }

    public void setPostLiked(Integer postLiked) {
        this.postLiked = postLiked;
    }

    public void setPostCollected(Integer postCollected) {
        this.postCollected = postCollected;
    }

    public void setPostComment(Integer postComment) {
        this.postComment = postComment;
    }

    public void setPostFloor(Integer postFloor) {
        this.postFloor = postFloor;
    }

    public void setPostAdminId(Integer postAdminId) {
        this.postAdminId = postAdminId;
    }

    public void setPostDelete(Integer postDelete) {
        this.postDelete = postDelete;
    }

    public Integer getPostBarId() {
        return postBarId;
    }

    public Integer getUserId() {
        return userId;
    }

    public Integer getPostId() {
        return postId;
    }

    public String getPostName() {
        return postName;
    }

    public String getCreateDate() {
        return createDate;
    }

    public String getPostContent() {
        return postContent;
    }

    public Integer getPostBrowsing() {
        return postBrowsing;
    }

    public Integer getPostLiked() {
        return postLiked;
    }

    public Integer getPostCollected() {
        return postCollected;
    }

    public Integer getPostComment() {
        return postComment;
    }

    public Integer getPostFloor() {
        return postFloor;
    }

    public Integer getPostAdminId() {
        return postAdminId;
    }

    public Integer getPostDelete() {
        return postDelete;
    }

    @Override
    public String toString() {
        return "Post{" +
                "postBarId=" + postBarId +
                ", userId=" + userId +
                ", postId=" + postId +
                ", postName='" + postName + '\'' +
                ", createDate='" + createDate + '\'' +
                ", postContent='" + postContent + '\'' +
                ", postBrowsing=" + postBrowsing +
                ", postLiked=" + postLiked +
                ", postCollected=" + postCollected +
                ", postComment=" + postComment +
                ", postFloor=" + postFloor +
                ", postAdminId=" + postAdminId +
                ", postDelete=" + postDelete +
                '}';
    }
}
